package io.fredia.femicro.gate.server.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import io.fredia.femicro.api.vo.authority.PermissionInfo;
import io.fredia.femicro.gate.server.fallback.UserServiceFallback;


/**
 * 用户服务
 * 
 * @author : Fredia
 * @since : 2018年3月12日
 * @version : v1.0.0
 */
@FeignClient(value = "femicro-admin",fallback = UserServiceFallback.class)
public interface IUserService {
  @RequestMapping(value="/api/user/un/{username}/permissions",method = RequestMethod.GET)
  public List<PermissionInfo> getPermissionByUsername(@PathVariable("username") String username);
  @RequestMapping(value="/api/permissions",method = RequestMethod.GET)
  List<PermissionInfo> getAllPermissionInfo();
}
